home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_plotutils.idb / usr / freeware / share / ode / bead.ode.z / bead.ode
Encoding:
Text File  |  1998-10-28  |  535 b   |  24 lines

  1. # This example simulates a bead sliding on a smooth circular wire.  The
  2. # output displays the height of the bead as a function of time.
  3. #
  4. # You may run this example by doing:
  5. #
  6. #    ode < bead.ode | graph -T X -C
  7. # or alternatively, to get a real-time plot,
  8. #
  9. #    ode < bead.ode | graph -T X -C -x 0 5 -y 0 2.5
  10. #
  11.  
  12. a = 1  # radius of circular wire
  13. g = 10 # acceleration due to gravity
  14. w = 10 # angular velocity of circular wire
  15.  
  16. the' = vthe
  17. vthe' = (w^2)*sin(the)*cos(the) - (g/a)*sin(the)
  18. the = 0.1
  19. vthe = 0
  20.  
  21. print t, the
  22. step 0,5
  23.